function showConnectSuc(){
	var obj = swfobject.getObjectById("ServerLite");
	//var code = swfobject.getQueryParamValue("code");
	var src = "renren";
	var uid = swfobject.getQueryParamValue("xn_sig_user");
	var recomm = swfobject.getQueryParamValue("recommId");

	var paras = {src:src,code:'',uid:uid,recomId:recomm,isApp:true,version:Game.versionstr,logoBarId:'logoBar1.png'};

	obj.loginOthersFunc(paras);
 }

/**
 * 邀请
 * **/
function showPopupInvite(fromUser){
	var params = {
			"accept_url":Game.appUrl+"/index.html?invperson="+fromUser,
			"accept_label":"接受邀请",
			"app_id":"211553",
			"requestContent": '找到属于自己的缘分，享受快乐的两人世界。有趣的交友方式，你一定会喜欢！',
			"actiontext":"人气越高,机会越多哦！"
		};

	var uiOpts = {
		url : "request",
		display : "iframe",
		style:{
			top:10,
			height:500,
			width:600
		},
		params : params,
		//style : style,/*设置弹层的位置和尺寸*/
		onSuccess: function(r){},
		onFailure: function(r){} 
	};  
	  Renren.ui(uiOpts);
	
}


function sendFeed(option, callBack){
            var imgSrc = option.imgSrc;
            var feed = '';
			feed += randomString(['你们要不要一起来玩啊？','一起玩吧！！']);
			var emotion = randomString(['(谄笑)','(吃饭)','(调皮)','(惊恐)','(可爱)','(酷)','(流口水)','(猫猫笑)','(色)','(淘气)','(舔)','(偷笑)','(吻)','(大笑)','(害羞)','(微笑)','(书呆子)','(惊讶)']);
			emotion = emotion+emotion+emotion;
			feed = feed+emotion;

			var params = {
	            		"name": option.title,
	            		"description": option.userMessagePrompt,
	            		'caption':'  ',
						'app_id':"211553",
	            		'url': option.actionLink,
	            		'image': imgSrc,
	            		'action_name': option.actionName,
	            		'action_link': option.actionLink,
	            		'message': option.userInputDefault+feed
	            };
	        	var uiOpts = {
	        		url : "feed",
	        		display : "iframe",
	        		params : params,
	        		style:{
					top:50	
					},
	        		onSuccess: function(r){
	        			shareFeedRewardCallback(true);
	        		},
	        		onFailure: function(r){
	        			
	        		} 
	        	};
	        	Renren.ui(uiOpts);
            }

/**
 * 分享完成新鲜事后, 获取奖励回调的方法
 * 
 * @param {}
 *            result
 */
function shareFeedRewardCallback(result){	
   	    var swf = swfobject.getObjectById('ServerLite');
	    if(swf && 'function' == typeof(swf.share4RewardComplete)){
	        swf.share4RewardComplete(result);
	    }else{
			//alert('swf not find!');
		}
}


/**
 * 从数组[str1,str2,str3]中随机取一条字符串
 * */
function randomString(arr){
	if(typeof(arr)=='object'){
		return arr[Math.floor(Math.random()*arr.length)];
	}
	return arr;
}
